<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <!-- 
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
xmlns="http://tdisf" exclude-result-prefixes="tdisf">
 -->
    <!--
        <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:td="http://tdisf" exclude-result-prefixes="td"> <xsl:output
        omit-xml-declaration="yes" indent="no" /> <xsl:template match="/" > <xsl:output omit-xml-declaration="yes" indent="no" />
    -->

    <xsl:template match="/">
        <resultset>
            <xsl:for-each select="*">
                <row>
                    <xsl:for-each select="*/*">
                        <column>
                            <xsl:variable name="propertyName" select="local-name()" />
                            <name>
                                <xsl:value-of select="local-name()" />
                            </name>
                            <value>
                             <xsl:choose>
                                <xsl:when test="count(descendant::*)&gt;0">
                                    <xsl:copy-of  select="current()"/>
                                </xsl:when>
                                <xsl:otherwise>
                                    <xsl:value-of select="current()" />
                                </xsl:otherwise>
                            </xsl:choose>
                            </value>    
                        </column>
                    </xsl:for-each>
                </row>
            </xsl:for-each>
        </resultset>
    </xsl:template>
</xsl:stylesheet>